package com.rickpan.dto.response;

/**
 * 团队密钥响应DTO
 * 
 * @author RickPan Team
 * @since 2025-07-19
 */
public class TeamKeyDTO {

    private Long id;
    private Long teamId;
    private Integer keyVersion;
    private String encryptedKey; // Base64编码的加密密钥
    private String algorithm;
    private Integer keyLength;
    private String status; // active, expired, revoked
    private Long createdBy;
    private String creatorName;
    private Long expiresAt; // 过期时间戳
    private Long createdAt; // 创建时间戳
    private Long updatedAt; // 更新时间戳

    // 构造函数
    public TeamKeyDTO() {}

    public TeamKeyDTO(Long teamId, Integer keyVersion, String encryptedKey) {
        this.teamId = teamId;
        this.keyVersion = keyVersion;
        this.encryptedKey = encryptedKey;
    }

    // Getter 和 Setter 方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getTeamId() {
        return teamId;
    }

    public void setTeamId(Long teamId) {
        this.teamId = teamId;
    }

    public Integer getKeyVersion() {
        return keyVersion;
    }

    public void setKeyVersion(Integer keyVersion) {
        this.keyVersion = keyVersion;
    }

    public String getEncryptedKey() {
        return encryptedKey;
    }

    public void setEncryptedKey(String encryptedKey) {
        this.encryptedKey = encryptedKey;
    }

    public String getAlgorithm() {
        return algorithm;
    }

    public void setAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }

    public Integer getKeyLength() {
        return keyLength;
    }

    public void setKeyLength(Integer keyLength) {
        this.keyLength = keyLength;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public Long getExpiresAt() {
        return expiresAt;
    }

    public void setExpiresAt(Long expiresAt) {
        this.expiresAt = expiresAt;
    }

    public Long getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Long createdAt) {
        this.createdAt = createdAt;
    }

    public Long getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Long updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        return "TeamKeyDTO{" +
                "id=" + id +
                ", teamId=" + teamId +
                ", keyVersion=" + keyVersion +
                ", algorithm='" + algorithm + '\'' +
                ", keyLength=" + keyLength +
                ", status='" + status + '\'' +
                ", createdBy=" + createdBy +
                ", creatorName='" + creatorName + '\'' +
                ", expiresAt=" + expiresAt +
                ", createdAt=" + createdAt +
                '}';
    }
}
